import request from '../utils/request'
const api_name = "/course"
export default {
    // 获取首页中的讲师和课程数据
    getIndexData() {
        return request({
            url: `${api_name}/indexdata`,
            method: "get",
        })
    },
    // 分页获取课程列表
    getPagedList(page, limit, searchObj) {
        return request({
            url: `${api_name}/search/${page}/${limit}`,
            method: "post",
            data: searchObj
        })
    },
    // 根据id获取课程详情
    getCourseDatatil(id) {
        return request({
            url: `${api_name}/detail/${id}`,
            method: "get"
        })
    }
}